PgLayoutLine

A PangoLayoutLine represents one of the lines resulting from laying out a paragraph via PangoLayout.

PangoLayoutLine structures are obtained by calling [method@Pango.Layout.get_line] and are only valid until the text, attributes, or settings of the parent PangoLayout are modified.

Constructors

this
this(PangoLayoutLine* pangoLayoutLine, bool ownedRef)

Sets our main struct and passes it to the parent class.

Destructor

~this
~this()
Undocumented in source.

Members

Aliases

doref
alias doref = ref_
Undocumented in source.

Functions

getExtents
void getExtents(PangoRectangle inkRect, PangoRectangle logicalRect)

Computes the logical and ink extents of a layout line.

getHeight
void getHeight(int height)

Computes the height of the line, as the maximum of the heights of fonts used in this line.

getLength
int getLength()

Returns the length of the line, in bytes.

getPgLayoutLineStruct
PangoLayoutLine* getPgLayoutLineStruct(bool transferOwnership)

Get the main Gtk struct

getPixelExtents
void getPixelExtents(PangoRectangle inkRect, PangoRectangle logicalRect)

Computes the logical and ink extents of @layout_line in device units.

getResolvedDirection
PangoDirection getResolvedDirection()

Returns the resolved direction of the line.

getStartIndex
int getStartIndex()

Returns the start index of the line, as byte index into the text of the layout.

getStruct
void* getStruct()

the main Gtk struct as a void*

getXRanges
void getXRanges(int startIndex, int endIndex, int[] ranges)

Gets a list of visual ranges corresponding to a given logical range.

indexToX
void indexToX(int index, bool trailing, int xPos)

Converts an index within a line to a X position.

isParagraphStart
bool isParagraphStart()

Returns whether this is the first line of the paragraph.

ref_
PgLayoutLine ref_()

Increase the reference count of a PangoLayoutLine by one.

unref
void unref()

Decrease the reference count of a PangoLayoutLine by one.

xToIndex
bool xToIndex(int xPos, int index, int trailing)

Converts from x offset to the byte index of the corresponding character within the text of the layout.

Properties

layout
PgLayout layout [@property getter]
PgLayout layout [@property setter]

the layout this line belongs to, might be %NULL

length
int length [@property getter]
int length [@property setter]

length of line in bytes

resolvedDir
uint resolvedDir [@property getter]
uint resolvedDir [@property setter]

#Resolved PangoDirection of line

runs
ListSG runs [@property getter]
ListSG runs [@property setter]

list of runs in the line, from left to right

startIndex
int startIndex [@property getter]
int startIndex [@property setter]

start of line as byte index into layout->text

Static functions

getType
GType getType()

Variables

ownedRef
bool ownedRef;
Undocumented in source.
pangoLayoutLine
PangoLayoutLine* pangoLayoutLine;

the main Gtk struct

Meta